package com.kunpan.admin.service;

import com.kunpan.admin.common.domain.AjaxResult;
import com.kunpan.admin.entity.ChunkFile;
import com.kunpan.admin.entity.PanFile;
import com.kunpan.admin.entity.dto.PanFileDto;
import org.springframework.data.repository.query.Param;
import org.springframework.http.HttpHeaders;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface PanFileService {
    /**
     * 查询文件列表
     */
    AjaxResult getFileList(PanFileDto panFileDto);

    AjaxResult addFolder(PanFile panFile);

    AjaxResult fileUpload(MultipartFile file, Integer parentId, String fileMd5);

    AjaxResult uploadFileChunk(MultipartFile file, ChunkFile chunkFile);

    AjaxResult chuckFileMd5Upload(Long fileSize, Integer parentId, String fileMd5, String fileName);

    AjaxResult mergeChunkFile(String fileMd5, Integer parentId, Integer shardTotal, String fileName);

    AjaxResult fileDownload(String objectName,Long fileSize, HttpServletResponse response);

    AjaxResult cancelFileUpload(String fileMd5);

//    AjaxResult getFileByFileNameAndParentId(String fileName, Integer parentId);
}
